package com.example.practical_training_projects.mapper;

import com.example.practical_training_projects.entity.testselect;
import com.example.practical_training_projects.entity.user;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface testselectMapper {
    @Select("SELECT *  FROM testselect")
    List<testselect> getAllclass();

    @Select("select * from testselect where ts_class = #{ts_class}")
    testselect findTestclass(String ts_class);

    @Insert("insert into testselect (ts_class)\n" +
            " values (#{ts_class})")
    Integer insertClass(testselect ts_class);

    @Select("select *from testselect where ts_class like '%${name}%'")
    List<testselect>  gettestselectClass(String ts_class);

    @Update("update testselect set ts_class=#{ts_class} where ts_uid = #{ts_uid}")
    Integer updateClass(testselect testselect1);
}
